<?php
// classe de base, avec ses membres et ses méthodes
class Login extends Controller{

  var $_pageName;
  var $_basePageName;
  var $_message = "";
  var $_defaultPage="index";

  var $_cssfile = "style.css";
  var $_tplfile;


   function Login() {
      parent::Controller();
   }

    function index()
    {
        $output="";
        $template['cssFile']=$this->_cssfile;
        if (isset($_SERVER['HTTP_REFERER']))
            $output['redirUrl']=$_SERVER['HTTP_REFERER'];
        else
            $output['redirUrl']=site_url('');
    	if(!$this->user->isLogged()) {
    	    //include javascript and display
            $template['body']=$this->load->view('admin/login.html.php',$output,true);
            $this->load->view('admin/main.html.php',$template);
        } else {
            $template['body']=$this->load->view('admin/logout.html.php',$output,true);
            $this->load->view('admin/main.html.php',$template);
        }
    }
  

  
} 
?>
